<?php 
$numbers = range (1,50); 
//shuffle 将数组顺序随即打乱 
shuffle ($numbers); 
//array_slice 取该数组中的某一段 
$num=6; 
$result = array_slice($numbers,0,$num);     
print_r($result); 
?>

